package com.bjpowernode.springboot.web.controller;

import com.bjpowernode.springboot.domain.Student;
import com.bjpowernode.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * CreateTime：2020/9/2 0:13
 */

@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @GetMapping("/getStudentList")
    public List<Student> getStudentList(){
        List<Student> sList = studentService.getStudentList();
        return sList;
    }

}
